//
//  WNBusinessRequest.h
//  Whatnet_iOS
//
//  Created by 北辰 on 2019/5/23.
//  Copyright © 2019 什么网络. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "WNNetwork.h"
#import "WATransactionModel.h"

NS_ASSUME_NONNULL_BEGIN
/**
 相关业务接口
 */
@interface WNBusinessRequest : NSObject
+ (void)sendCodeWithPhone:(NSString *)phone Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;
#pragma mark - 注册
//手机号、密码登录
+ (void)registerWithPhone:(NSString *)phone pass:(NSString *)pass suserid:(NSString *)suserid Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark - 登录
//手机号、密码登录
+ (void)loginWithPhone:(NSString *)phone pass:(NSString *)pass Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark - 用户信息
//用户ID、手机号、头像、昵称、真实姓名、银行名称、银行账号、身份证号、会员等级、活跃度、剩余糖果
+ (void)getUserInfoWithID:(NSString *)ID Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;
#pragma mark - 用户信息包含头像的
+ (void)getUserHeadImageSucc:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;
#pragma mark - 修改登录密码
+ (void)updateLoginpassWithPass:(NSString *)pwd Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;
#pragma mark - 修改支付密码
+ (void)updatePaypassWithPass:(NSString *)pwd Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark - 忘记密码
+ (void)modifyLoginpassWithPass:(NSString *)pwd phone:(NSString *)phone Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;
#pragma mark - 修改用户信息
//昵称、真实姓名、银行名称、银行账号、身份证号、交易密码
+ (void)updateUserInfoWithModel:(WNUserInfo *)userinfo Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark - 公告列表
//查询公告表所有的公告，支持分页
+ (void)getCommentInfoWithPageNum:(NSInteger )pageNum Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark - 任务列表
+ (void)getTaskInfoWithPageNum:(NSInteger )pageNum Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark - 任务列表
+ (void)getTaskListWithPageNum:(NSInteger )pageNum Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark - 查询任务信息
+ (void)checkTaskInfoWithID:(NSString *)ID Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark - 获取我的任务列表
+ (void)getMyTaskListWithPageNum:(NSInteger )pageNum status:(NSInteger )status Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark - 插入我的任务数据
+ (void)insertMyTaskListWithIsdefault:(NSInteger )isdefault taskid:(NSInteger )taskid Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark - 商家列表
//查询商家列表，支持分页
+ (void)getCompanyListWithPageNum:(NSInteger )pageNum Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark - 商家商品列表
//根据商家ID查询商品列表，支持分页
+ (void)getGoodsListWithCompanyID:(NSString *)companyID pageNum:(NSInteger )pageNum Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark - 查找单个商品
+ (void)getSinglGoos:(NSString *)ID Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark - 上传步数
//步数上传接口
+ (void)uploadStepCount:(NSString *)count Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark - 地址管理
#pragma mark 删除接口
+ (void)deleteAddressWithID:(NSString *)ID Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark 新增接口
+ (void)addAddressWithID:(NSString *)ID
                  address:(NSString *)address
                  isdefault:(BOOL)isdefault
                  name:(NSString *)name
                  phone:(NSString *)phone
                    Succ:(WNRequestSuccess)succ
                    fail:(WNRequestFailure)fail;

#pragma mark 查询列表接口
+ (void)getAddressListWithPageNum:(NSInteger )pageNum Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;


#pragma mark 订单列表接口
+ (void)getOrderListWithType:(NSInteger)type pageNum:(NSInteger )pageNum Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;


#pragma mark - 下单
+ (void)addOrderWithGoodsID:(NSInteger)goodsID
          addressid:(NSInteger )addressid
              price:(CGFloat )price
             number:(NSInteger )number
            Succ:(WNRequestSuccess)succ
                       fail:(WNRequestFailure)fail;

#pragma mark - 商品支付
+ (void)payWithOrderID:(NSInteger)orderID payPwd:(NSString *)pwd Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark 获取默认地址
+ (void)getDefauleAddressListSucc:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark 修改接口
+ (void)updateAddressListWithWithID:(NSString *)ID
              address:(NSString *)address
              isdefault:(BOOL)isdefault
              name:(NSString *)name
              phone:(NSString *)phone
                Succ:(WNRequestSuccess)succ
                fail:(WNRequestFailure)fail;


#pragma mark 查询单个接口
+ (void)getTransactionInfo:(NSInteger )ID Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark 查询列表接口--交换中心用
//transactiontype交易类型0表示买1表示卖
//status交易状态 0未完成，1完成
+ (void)getTransactionListWithPageNum:(NSInteger )pageNum
                      transactiontype:(NSInteger )transactiontype
                                 status:(NSInteger )status
                                 phone:(NSString *)phone
                                 Succ:(WNRequestSuccess)succ
                                 fail:(WNRequestFailure)fail;

#pragma mark 查询列表接口--我的交易用
//transactiontype交易类型0表示买1表示卖
//status交易状态 0未完成，1完成
+ (void)getTransactionListMineWithPageNum:(NSInteger )pageNum
                      transactiontype:(NSInteger )transactiontype
                                 status:(NSInteger )status
                                 dealuserid:(NSInteger )dealuserid
                                 userid:(NSInteger )userid
                                 Succ:(WNRequestSuccess)succ
                                     fail:(WNRequestFailure)fail;

#pragma mark 发布订单接口
+ (void)publishTransaction:(WATransactionModel *)model Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;



#pragma mark 查询近10天每日买单/卖单平均值 /transactioninfo//
+ (void)getTenDayTransactionDataWithType:(NSInteger)type Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;


#pragma mark 修改接口
//type参数   1 买 /卖 2上传截图  3确认交易 4取消
//status 交易状态 0未完成，1，交易中，2完成
+ (void)updateTransactioninfoWithType:(NSInteger)Type ID:(NSInteger )ID status:(NSInteger )status image:(NSString *)imageUrl Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark 查询交换统计数据
+ (void)getTransactionTotalDataWithType:(NSInteger)type Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

#pragma mark 好友列表

/// 好友列表
/// @param type 0:一级  1：二级   2：三级
+ (void)getFriendListWithType:(NSInteger)type
                      pageNum:(NSInteger )pageNum
                         Succ:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

+ (void)getNewVisionSucc:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;

+ (void)getQiuneTokenSucc:(WNRequestSuccess)succ fail:(WNRequestFailure)fail;
@end

NS_ASSUME_NONNULL_END
